﻿<!DOCTYPE html>
<html class="bg-white">

<head>
  <meta charset="utf-8" />
  <title>SiteServer CMS - 用户中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta content="SiteServer CMS 用户中心" name="description" />
  <meta content="SiteServer CMS" name="author" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <link rel="shortcut icon" href="../assets/images/favicon.ico">
  <link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  <link href="../assets/lib/vue-multiselect/style-2.1.0.min.css" rel="stylesheet" type="text/css" />
  <link href="../assets/css/font-awesome-4.7.0.min.css" rel="stylesheet" type="text/css" />
  <link href="../assets/css/ionicons-2.0.0.min.css" rel="stylesheet" type="text/css" />
  <link href="../assets/css/siteserver.min.css" rel="stylesheet" type="text/css" />
  <script src="../assets/lib/modernizr.min.js"></script>
  <script type="text/javascript" src="../assets/lib/iframe-resizer-3.6.2/iframeResizer.contentWindow.min.js"></script>
</head>

<body style="padding-bottom: 0;" class="bg-white">
  <div id="main" class="m-t-15 m-b-15 m-l-15 m-r-15">

    <template v-if="pageLoad">

      <div v-if="pageAlert" class="alert" v-bind:class="{ 'alert-warning': pageAlert.type === 'warning', 'alert-success': pageAlert.type === 'success', 'alert-danger': pageAlert.type === 'danger' }">
        <button v-on:click="pageAlert = null" class="close" data-dismiss="alert">×</button>
        <span v-html="pageAlert.html"></span>
      </div>

      <div v-if="files.length > 0" class="row">
        <div v-for="(file, index) in files" class="col-sm-4 col-lg-3 col-xs-12">
          <div class="card m-b-20">
            <img class="card-img-top img-fluid" :src="file.url">
            <div class="card-body">
              <small class="text-muted">图片大小：{{ file.contentLength > 1048576 ? Math.round(file.contentLength/1048576) +
                ' MB' : Math.round(file.contentLength/1024) +
                ' KB' }}</small>
              <a v-on:click="del(file)" href="javascript:;" class="card-link text-danger float-right">删 除</a>
            </div>
          </div>
        </div>
      </div>

      <div v-if="inputType === 'TextEditor' || files.length === 0" id="drop-area" style="height: 200px; line-height: 200px; text-align: center; font-size: 18px; color: #777; border: 2px dashed #0000004d; background: #eee;	border-radius: 6px; cursor: pointer; margin-bottom: 20px">
        点击批量上传图片或者将图片拖拽到此区域
      </div>

      <div v-if="inputType !== 'TextEditor'" class="form-row align-items-center ml-3">
        <div class="col-auto">
          <div class="checkbox checkbox-primary form-check-inline">
            <input type="checkbox" id="isFix" v-model="isFix">
            <label for="isFix"> 压缩图片 </label>
          </div>
        </div>
        <div v-if="isFix" class="col-auto">
          <div class="input-group mb-2">
            <div class="input-group-prepend">
              <div class="input-group-text">宽</div>
            </div>
            <input type="text" class="form-control" v-model="fixWidth">
          </div>
        </div>
        <div v-if="isFix" class="col-auto">
          <div class="input-group mb-2">
            <div class="input-group-prepend">
              <div class="input-group-text">高</div>
            </div>
            <input type="text" class="form-control" placeholder="不设置将按比例缩放" v-model="fixHeight">
          </div>
        </div>
      </div>

      <div class="form-row align-items-center ml-3">
        <div v-if="inputType !== 'TextEditor'" class="col-auto">
          <div class="checkbox checkbox-primary form-check-inline">
            <input type="checkbox" id="isEditor" v-model="isEditor">
            <label for="isEditor"> 将图片显示在内容编辑框中 </label>
          </div>
        </div>
        <div class="col-auto">
          <div class="checkbox checkbox-primary form-check-inline">
            <input type="checkbox" id="editorIsFix" v-model="editorIsFix">
            <label for="editorIsFix"> 显示缩略图 </label>
          </div>
        </div>
        <div v-if="editorIsFix" class="col-auto">
          <div class="input-group mb-2">
            <div class="input-group-prepend">
              <div class="input-group-text">宽</div>
            </div>
            <input type="text" class="form-control" v-model="editorFixWidth">
          </div>
        </div>
        <div v-if="editorIsFix" class="col-auto">
          <div class="input-group mb-2">
            <div class="input-group-prepend">
              <div class="input-group-text">高</div>
            </div>
            <input type="text" class="form-control" placeholder="不设置将按比例缩放" v-model="editorFixHeight">
          </div>
        </div>
        <div v-if="editorIsFix" class="col-auto">
          <div class="checkbox checkbox-primary form-check-inline">
            <input type="checkbox" id="editorIsLinkToOriginal" v-model="editorIsLinkToOriginal">
            <label for="editorIsLinkToOriginal"> 图片可链接到原图 </label>
          </div>
        </div>
      </div>

      <hr />

      <div class="text-right mr-1">
        <button v-on:click="btnSubmitClick" type="button" class="btn btn-primary m-l-5">确 定</button>
        <button type="button" class="btn btn-default m-l-5" onclick="window.parent.layer.closeAll()">取 消</button>
      </div>

    </template>
    <template v-else>
      <div class="text-center" style="margin-top: 100px">
        <img class="mt-3" src="../assets/images/loading.gif" />
        <p class="lead mt-3 text-nowrap">载入中，请稍后...</p>
      </div>
    </template>

  </div>
</body>

</html>

<script src="../assets/lib/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../assets/lib/popper.min.js"></script>
<script src="../assets/lib/bootstrap.min.js"></script>
<script src="../assets/lib/lodash-4.17.10.min.js" type="text/javascript"></script>
<script src="../assets/lib/layer-3.1.1/layer.js" type="text/javascript"></script>
<script src="../assets/lib/sweetalert2-7.28.4.all.min.js" type="text/javascript"></script>
<script src="../assets/lib/vue-2.5.16.min.js" type="text/javascript"></script>
<script src="../assets/lib/vee-validate-2.1.0.js"></script>
<script src="../assets/lib/vee-validate-locale-zh_CN-2.1.0.js"></script>
<script src="../assets/lib/js.cookie-2.2.0.js"></script>
<script src="../assets/js/utils.js" type="text/javascript"></script>
<script src="../config.js" type="text/javascript"></script>

<script type="text/javascript" src="../assets/lib/web-uploader/js/Q.js"></script>
<script type="text/javascript" src="../assets/lib/web-uploader/js/Q.Uploader.js"></script>
<script src="contentAddLayerImage.js" type="text/javascript"></script>